#ifndef __FWindows_H__
#define __FWindows_H__
#include "vmsys.h"
#include "Framework.h"

enum
{
	SYSTEM_WIN_ID_START = 0,
	SYSTEM_WIN_ID_MSG_ALERT = SYSTEM_WIN_ID_START,
	SYSTEM_WIN_ID_MSG_CONFIRM,
	SYSTEM_WIN_ID_MSG_WAITING,
	
	SYSTEM_WIN_ID_END
};

extern void WindowsDrawManager(void);
extern void SetActiveWindowID(VMINT id);
extern VMINT GetActiveWindowID(void);
extern VMINT GetActiveWindowHwnd(void);

extern VMINT CreateWindow(
	VMINT x, 
	VMINT y, 
	VMINT width, 
	VMINT height, 
	VMINT win_id, 
	VMINT win_type,
	VMSTR win_name, 
	FuncPtr win_init,
 	FuncPtr win_show,
 	FuncPtr win_refresh,
 	FuncPtr win_free,
	void (*touch_event)(VMINT t_event, VMINT xt, VMINT yt),
	void (*win_msg_proc)(VMINT hwnd, VMINT msg_id, VMINT wparam, VMINT lparam)
);
extern void ShowWindow(VMINT hwnd);
extern void RefreshWindow(VMINT hwnd);
extern void FreeWindow(VMINT hwnd);

extern void PostWinMessage(VMINT hwnd, VMINT msg_id, VMINT wparam, VMINT lparam);

extern VMINT is_windows_init_done;

#endif
